import request from '@/utils/request'


// 查询科室列表
export function listHisDm(query) {
  return request({
    url: '/system/hisdm/list',
    method: 'get',
    params: query
  })
}

// 查询指定科室
export function getDm(sdId) {
  return request({
    url: '/system/hisdm/getById/' + sdId,
    method: 'get'
  })
}

// 新增科室
export function addDm(data) {
  return request({
    url: '/system/hisdm/add',
    method: 'post',
    data: data
  })
}


// 修改科室
export function updateDm(data) {
  return request({
    url: '/system/hisdm/update',
    method: 'put',
    data: data
  })
}

// 删除科室
export function deldm(sdId) {
  return request({
    url: '/system/hisdm/remove/' + sdId,
    method: 'delete'
  })
}






















// 查询部门列表（排除节点）
export function listDeptExcludeChild(deptId) {
  return request({
    url: '/system/dept/list/exclude/' + deptId,
    method: 'get'
  })
}



// 查询部门下拉树结构
export function treeselect() {
  return request({
    url: '/system/dept/treeselect',
    method: 'get'
  })
}

// 根据角色ID查询部门树结构
export function roleDeptTreeselect(roleId) {
  return request({
    url: '/system/dept/roleDeptTreeselect/' + roleId,
    method: 'get'
  })
}


